//package com.techwells.learningkites.adapter;
//
//import java.io.Serializable;
//import java.util.HashMap;
//import java.util.List;
//import java.util.Map;
//
//import com.techwells.learningkites.R;
//import com.techwells.learningkites.networkservice.model.Word;
//
//
//import android.content.Context;
//import android.util.Log;
//import android.view.LayoutInflater;
//import android.view.View;
//import android.view.ViewGroup;
//import android.widget.BaseExpandableListAdapter;
//import android.widget.CheckBox;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//public class WordExpandListAdapter extends BaseExpandableListAdapter {
//	
//	private Context mContext;
//	private List<Word> mList;
//	private LayoutInflater mGroupInflater,mChildInflater;
//	
//	
//	public WordExpandListAdapter(Context mContext,
//			List<Word> mList) {
//		super();
//		this.mContext = mContext;
//		this.mList = mList;
//		mGroupInflater =(LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//		mChildInflater =(LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//		
//	}
//
//	@Override
//	public Object getChild(int arg0, int arg1) {
//		// TODO Auto-generated method stub
//		return mList.get(arg0).sentences.get(arg1);
//	}
//
//	@Override
//	public long getChildId(int arg0, int arg1) {
//		// TODO Auto-generated method stub
//		return arg1;
//	}
//
//	@Override
//	public View getChildView(int groupPosition, int childPosition,
//			boolean isLastChild, View convertView, ViewGroup parent) {
//		CellHolderChild cellHolderChild;
//        if (convertView == null) {
//        	cellHolderChild = new CellHolderChild();
//        		convertView = mGroupInflater.inflate(R.layout.item_sentenceslist, null);
//        		cellHolderChild.sentence = (TextView) convertView.findViewById(R.id.sentence);
//        		cellHolderChild.sentenceExplanation = (TextView) convertView.findViewById(R.id.sentence_explanation);
//        		cellHolderChild.soundSentence = (ImageView) convertView.findViewById(R.id.sound_sentence);
//                convertView.setTag(cellHolderChild);
//
//        } else {
//        	cellHolderChild = (CellHolderChild) convertView.getTag();
//        }        
//        
//       
//		return convertView;
//	}
//
//	@Override
//	public int getChildrenCount(int groupPosition) {
//		// TODO Auto-generated method stub
//		return mList.get(groupPosition).sentences.size();
//	}
//
//	@Override
//	public Object getGroup(int groupPosition) {
//		// TODO Auto-generated method stub
//		return mList.get(groupPosition);
//	}
//
//	@Override
//	public int getGroupCount() {
//		// TODO Auto-generated method stub
//		return mList.size();
//	}
//
//	@Override
//	public long getGroupId(int groupPosition) {
//		// TODO Auto-generated method stub
//		return groupPosition;
//	}
//
//	@Override
//	public View getGroupView(int groupPosition, boolean isExpanded,
//			View convertView, ViewGroup parent) {
//		CellHolderGroup cellHolderGroup;
//        if (convertView == null) {
//        	cellHolderGroup = new CellHolderGroup();
//        		convertView = mGroupInflater.inflate(R.layout.item_wordslist, null);
//        		cellHolderGroup.num = (TextView) convertView.findViewById(R.id.num);
//        		cellHolderGroup.word = (TextView) convertView.findViewById(R.id.word);
//        		cellHolderGroup.soundEn = (TextView) convertView.findViewById(R.id.sound_en);
//        		cellHolderGroup.soundUs = (TextView) convertView.findViewById(R.id.sound_us);
//        		cellHolderGroup.explanation = (TextView) convertView.findViewById(R.id.explanation);
//        		cellHolderGroup.collins = (TextView) convertView.findViewById(R.id.collins);
//        		cellHolderGroup.cet4 = (TextView) convertView.findViewById(R.id.cet4);
//        		cellHolderGroup.ce6 = (TextView) convertView.findViewById(R.id.cet6);
//        		cellHolderGroup.stud = (TextView) convertView.findViewById(R.id.stud);
//        		
//        		cellHolderGroup.more = (ImageView) convertView.findViewById(R.id.iv_more);
//                convertView.setTag(cellHolderGroup);
//                
//                
//
//        } else {
//        	cellHolderGroup = (CellHolderGroup) convertView.getTag();
//        }        
//        
//        if(isExpanded){   
//        	cellHolderGroup.more.setImageResource(R.drawable.more_black_down) ;  
//         }else {
//        	 cellHolderGroup.more.setImageResource(R.drawable.more_black);
//		}
//       
//		return convertView;
//	}
//
//	@Override
//	public boolean hasStableIds() {
//		// TODO Auto-generated method stub
//		return true;
//	}
//
//	@Override
//	public boolean isChildSelectable(int groupPosition, int childPosition) {
//		// TODO Auto-generated method stub
//		return true;
//	}
//	
//	public static class CellHolderGroup implements Serializable{
//    	TextView num,word,soundEn,soundUs,explanation,collins,cet4,ce6,stud;
//    	ImageView imgSoundEn,imgSoundUs,favorite;
//    	ImageView more;
//    }
//	
//	public static class CellHolderChild implements Serializable{
//    	TextView sentence,sentenceExplanation;
//    	ImageView soundSentence;
//    }
//
//}
